package com.ruoyi.hospital.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 医院管理对象 hospital
 *
 * @author 天天困
 * @date 2025-08-14
 */

public class Hospital extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 医院ID，主键自增
     */
    private Long id;

    /**
     * 医院名称
     */
    @Excel(name = "医院名称")
    private String name;

    /**
     * 医院地址
     */
    @Excel(name = "医院地址")
    private String address;

    /**
     * 医院描述
     */
    private String description;

    /**
     * 医院头像URL
     */
    @Excel(name = "医院头像URL")
    private String avatar;

    /**
     * 医院联系电话
     */
    @Excel(name = "医院联系电话")
    private String phone;

    /**
     * 医院等级，如三甲等
     */
    @Excel(name = "医院等级，如三甲等")
    private String level;
    /**
     * 经度
     */
    @Excel(name = "经度")
    private Double longitude;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    private Double latitude;
    private Double distance; // 临时字段，用于返回查询结果

    // ▼▼▼ 新增方法 ▼▼▼
    public Double getDistance()
    {
        return
                distance;
    }

    public void setDistance(Double distance)
    {
        this
                .distance = distance;
    }
    // ▲▲▲ 新增方法 ▲▲▲
    // 添加getter和setter方法
// ▼▼▼ 新增的getter和setter方法 ▼▼▼
    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }
    // ▲▲▲ 新增的getter和setter方法 ▲▲▲
    /**
     * 删除标记：0未删除，1已删除
     */
    private Integer del;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getLevel() {
        return level;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    public Integer getDel() {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("address", getAddress())
                .append("description", getDescription())
                .append("avatar", getAvatar())
                .append("phone", getPhone())
                .append("level", getLevel())
                .append("longitude", getLongitude())  // 新增toString字段
                .append("latitude", getLatitude())    // 新增toString字段
                .append("del", getDel())
                .toString();
    }
}
